<template>
  <div id="app">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane v-for="item in $router.options.routes" :key="item.path" :label="item.name" :name="item.name" />
    </el-tabs>
    <div>
      <router-view :pro_timeout="15" />
    </div>
  </div>
</template>

<script>
import router from "./router/index";
export default {
  name: "App",
  components: {},
  data() {
    return {
      activeName: "/",
    };
  },
  mounted() {
    this.activeName = router.currentRoute.name;
  },
  methods: {
    fnEmit(){
      console.log(111);
    },
    handleClick(tab) {
      router.push({
        name: tab.name,
      });
    },
    aaaa() {
      alert();
    },
    switchSrc() {
      this.videoOptions.sources = [
        {
          src: "https://www.runoob.com/try/demo_source/movie.mp4",
          type: "video/mp4",
        },
      ];
    },
  },
};
</script>

<style>
@import "./style/base.css";

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;

  .video-content {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
}
</style>
